package main
import (
	"fmt"
	"math"
)

func main() {
	var str string
	str = "abcba"
	fmt.Println(isPalindrome(str))
}

func isPalindrome(s string) bool {
	if len(s) == 0 || len(s) == 1 {
		return false
	} else {
		var isPad bool = false
		var slen float64 =  float64(len(s))
		lpt := int(math.Floor(float64((slen-1)/2)))
		rpt := int(math.Ceil(float64((slen-1)/2)))
		for ;; {
			if lpt<0 && rpt>int(slen-1) {
				isPad = true
				return isPad
			}
			if s[lpt:lpt+1] != s[rpt:rpt+1] {
				break
			}
			lpt--
			rpt++
		}
		return isPad
	}
}